-- GENERATED SPELL FOR [Shadowmoon Summoner] --


function spell0_17395(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17395', 3000, 1)
end

function spell1_17395(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17395', 3000, 1)
end

function spell2_17395(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(16102,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17395', 11000, 1)
end

function spell3_17395(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(18399,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17395', 11000, 1)
end

function spell4_17395(pUnit, Event) --@Summon Felhound Manastalker,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(30851,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_17395', 1, 1)
end

function spell5_17395(pUnit, Event) --@Summon Seductress,Self--
pUnit:FullCastSpellOnTarget(30853,pUnit)
pUnit:RegisterEvent('Sorts_17395', 35000, 1)
end

function Sorts_17395(pUnit, Event)
local choix_sorts_17395 = math.random(0, 5)
if choix_sorts_17395 == 0 then
pUnit:RegisterEvent('spell0_17395', 1, 1)
end
if choix_sorts_17395 == 1 then
pUnit:RegisterEvent('spell1_17395', 1, 1)
end
if choix_sorts_17395 == 2 then
pUnit:RegisterEvent('spell2_17395', 1, 1)
end
if choix_sorts_17395 == 3 then
pUnit:RegisterEvent('spell3_17395', 1, 1)
end
if choix_sorts_17395 == 4 then
pUnit:RegisterEvent('spell4_17395', 1, 1)
end
if choix_sorts_17395 == 5 then
pUnit:RegisterEvent('spell5_17395', 1, 1)
end
end

function mob17395_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17395', math.random(1500, 3000), 1)
end

function mob17395_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17395_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17395_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17395, 1, 'mob17395_Action')
RegisterUnitEvent(17395, 2, 'mob17395_Leave')
RegisterUnitEvent(17395, 3, 'mob17395_Kill')
RegisterUnitEvent(17395, 4, 'mob17395_Die')
